package JUNHO.regexps;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class HtmlScanner
{

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		File file = new File("C:\\Users\\Dyego\\Documents\\site.html");
		try
		{
			BufferedReader bf = new BufferedReader(new FileReader(file));
			
			Pattern p = Pattern.compile("[^[<.*?>]]");//<body></body>
			
			String linha = "";
			while((linha = bf.readLine()) != null)
			{
//				System.out.print(linha+">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
				Matcher m = p.matcher(linha);
				while(m.find())
				{
					System.out.println(m.group());
				}
			}
		}
		catch (FileNotFoundException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
